package com.zzk.lanouhn.myapplication1.adapters;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by lanouhn on 16/9/10.
 */
public class FindDetailsXiaotuViewAdapter extends FragmentPagerAdapter {
    private List<String> taName;
    private List<Fragment> fragments;

    public FindDetailsXiaotuViewAdapter(FragmentManager fm, List<String> taName, List<Fragment> fragments) {
        super(fm);
        this.taName = taName;
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return taName.get(position);
    }

}
